<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>" />
<meta charset="UTF-8">
<title>欢迎访问大学生实训平台</title>
<link rel="stylesheet" href="css/font.css">
<link rel="stylesheet" href="css/login.css">
<link rel="stylesheet" href="css/xadmin.css">
<script src="lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="lib/layui/controller.js"></script>
<script type="text/javascript">
	function checkLogin() {
		var username = document.myform.username.value;
		var password = document.myform.password.value;
		if (username == '') {
			alert('请输入用户名');
			document.myform.username.focus();
			return false;
		}
		if (password == '') {
			alert('请输入密码');
			document.myform.password.focus();
			return false;
		}
	}
</script>
</head>
<%
	String message = (String) session.getAttribute("message");
	if (message == null) {
		message = "";
	}
	if (!message.trim().equals("")) {
		out.println("<script language='javascript'>");
		out.println("alert('" + message + "');");
		out.println("</script>");
	}
	session.removeAttribute("message");
%>
<body>
<body class="login-bg">
	<div class="login layui-anim layui-anim-up">
		<div class="message">欢迎访问大学生实训平台</div>
		<div id="darkbannerwrap"></div>
		<form class="layui-form" action="login/login.action" name="myform" method="post" onSubmit="return checkLogin()">
			<input name="username" id="username" placeholder="请输入用户名" type="text" class="layui-input">
			<hr class="hr15">
			<input name="password" id="password" placeholder="请输入密码" type="password" class="layui-input">
			<hr class="hr15">
			<input type="radio" name="role" value="管理员" title="管理员" id="banner"> <input type="radio" name="role"
				value="企业用户" title="企业用户" id="banner" checked>
			<hr class="hr15">
			<input value="登录" style="width: 100%;" type="submit">
			<hr class="hr20">
		</form>
	</div>
</body>
</html>
